﻿<?php 
	session_start();

class View {
	public static function displayHeader() {
		echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<title>Home - Home Page | IT World</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="description" content="Place your description here" />
<meta name="keywords" content="put, your, keyword, here" />
<meta name="author" content="Michał Grot, Tomasz Biernacki" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<link href="form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="JavaScripts/scripts.js">
</script>

<!--[if lt IE 7]>
	<link href="style_ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body id="page1">
	<div class="tail-top-right"></div>
	<div class="tail-top">
	  <div class="tail-bottom">
	    <div id="main">
	      <!-- header -->
	      <div id="header">
	        <ul class="list">
	          <li><a href="index.php"><img src="images/icon1.gif" alt="" /></a></li>
	          <li class="last"><a href="contact_us.php"><img src="images/icon2.gif" alt="" /></a></li>
	        </ul>
	        <ul class="site-nav">
	          <li><a href="index.php">Nowości</a></li>
	          <li><a href="compare.php">Porównaj sprzęt</a></li>
	          <li><a href="about_us.php">O nas</a></li>';
			if (isset($_SESSION['user_id']) && $_SESSION['user_id']!='') {
				echo '<li><a href="user_edit.php"><b>Moje dane</b></a></li>
					  <li><a href="user_edit_device.php"><b>Mój sprzęt</b></a></li>
					  <li><a href="logout.php"><b>Wyloguj</b></a></li>';
			} else {
				echo '<li><a href="login.php">Logowanie</a></li>
	          		  <li class="last"><a href="register.php">Rejestracja</a></li>';
			}	          			  
	        echo '</ul>
	        <div class="logo"><a href="index.php"><img src="images/logo.gif" alt="" /></a></div>
	        <div class="slogan"><img src="images/slogan.gif" alt="" /></div>
	      </div>
	      <!-- content -->';		
	}
	
	public static function displayMiddle($pMessage){
		echo '<br /><br /><p align=\'center\'>' . $pMessage . '  </p><br /><br />';
	}
	
	public static function displayFooter() {
		echo '
	      <!-- footer -->
      	  <div id="footer">
        	<div class="indent">
          	  <div class="fleft">Copyright - Tomasz Biernacki i Michał Grot.</div>
        	</div>
      	 </div>
       </div>
  	</div>
  </div>
</body>
</html>
		';
	}
}
?>